﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Data.Tables
{
    [Table("EmploymentType")]
    public class EmploymentType : EmploymentTypeFields
    { }

    public class EmploymentTypeData
    {
        public EmploymentType Type { get; set; } 

        [Display(Name = "Is Active")]
        public string IsActiveYesNo { get; set; }
    }

    public class EmploymentTypeQuery : EmploymentTypeFields
    {
        [Display(Name = "Is Active")]
        public string IsActiveYesNo { get; set; }
    }

    public class EmploymentTypeFields
    {
        [Key]
        [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
        [Display(Name = "ID")]
        public int ID { get; set; }

        [Required]
        [Index("UQ_EmploymentTypeName", IsUnique = true)]
        [Display(Name = "Employment Type")]
        public string EmploymentTypeName { get; set; }

        [Display(Name = "Is Active")]
        public bool IsActive { get; set; }
    }

}